<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .outer{
      position: relative;
      width: 300px;
      height: 300px;
      margin: 20px;
      border: 1px dashed grey;
    }
    .outer:hover .inner{
      background-color: transparent;
      transition: transform .3s, background-color .3s;
    }
    .outer:hover .inner::before{
      transform: translateY(8px) rotate(45deg);
    }
    .outer:hover .inner::after{
      transform: translateY(-8px) rotate(-45deg);
    }
    .inner{
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 20px;
      height: 2px;
      padding: 8px 0;
      background-clip: content-box;
      background-color: darkblue;
    }
    .inner::before, .inner::after{
      content: '';
      position: absolute;
      left: 0;
      width: 20px;
      height: 2px;
      background-color: darkblue;
      transition: transform .3s, background-color .3s;
    }
    .inner::before{
      top: 0;
    }
    .inner::after{
      bottom: 0;
    }


    .grid{
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
      grid-template-rows: 50px 50px;
      
    }
    .grid div{
      background-color: gray;
      margin: 10px;
    }
  </style>
</head>

<body>
  <div class="outer">
    <div class="inner"></div>
  </div>

  <div class="grid">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
  </div>
</body>

</html>